<?php

require_once 'init.inc';
require_once 'cf/image.inc';

$fname = $_SERVER['DOCUMENT_ROOT'].'/'.$par->get('path');

$img = Image::loadFromFile($fname);

$img->putWatermarkInTiles( Image::loadFromFile($_SERVER['DOCUMENT_ROOT'].'/images/watermark.gif'), 20 );

header('content-type: '.Image::getImageMime($fname));
$img->output(Image::getImageType($fname));

?>